<?php
/**
 * Yii view form
 *
 * @author luubk
 * @since Jan 11, 2013 - 2:46:02 PM
 */
?>
<ul class="tab-menu nav nav-tabs tabs-main" id="myTab">
    <li class="active">
        <a data="#index_tab" class="tab-control">
            <?php echo Yii::t('post', 'Post'); ?>

        </a>
    </li>
    <!--    <li>
            <a data="#seo_tab" class="tab-control">
    <?php // echo Yii::t('post', 'SEO') ?>
            </a>
        </li>-->
    <div class="clear"></div>
</ul>
<div id="index_tab" class="project_tab">
    <?php
    $this->beginWidget('MyActiveForm', array(
        'model' => $this->model,
        'title' => $this->pageTitle,
        'columns' => array(
            'name',
            'url',
            'rank',
            array(
                'field' => 'status',
                'type' => 'dropDownList',
                'data' => Category::getArrayStatus(),
                'htmlOptions' => array('class' => ""),
            ),
//            array(
//                'field' => 'parent_id',
//                'type' => 'dropDownList',
//                'data' => Category::getPublicArray(array($this->model->id)),
//                'htmlOptions' => array('class' => ""),
//            ),
        ),
    ));
    ?>
</div>
<?php $this->endWidget(); ?>
<script>
    $(function() {
        $('#Category_name').keyup(function() {
            title = $('#Category_name').val();
            $('#Category_url').val(convertToSlug(title));
        });
    });
</script>
